﻿Imports System.Data.SqlClient
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Enterprise
Imports System.Drawing.Font
Imports DMC.Land.User
Imports Microsoft.Reporting.WinForms
Public Class frmSoBienDong

    Private DTChu As New DataTable

    Public Property DB() As DataTable
        Get
            Return DTChu
        End Get
        Set(ByVal value As DataTable)
            DTChu = value
        End Set
    End Property


    Public Function fileReport() As String
        Dim ViTri As Short
        Dim path As String
        ViTri = InStr(4, Application.ExecutablePath, "\", CompareMethod.Binary)
        path = Application.ExecutablePath.Substring(0, ViTri) & Application.ProductName
        Dim file As String = ""
        file = Application.StartupPath & "\ReportsBC\SoBienDong.rpt"
        Return file
    End Function
    Public Sub LoadReport()

        reportDocument1.FileName = fileReport()

        reportDocument1.SetDataSource(DTChu)

        CrystalReportViewer1.ReportSource = reportDocument1
    End Sub

    Private Sub frmSoBienDong_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub
End Class